<div class="modal-dialog" style="width: 800px">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
                选择特惠商品
            </h4>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <label class="col-sm-1 control-label"></label>
                <div class="col-sm-12">
                    <div class="input-group">
                        <input type="text" class="form-control">
                        <a class="input-group-addon">搜索</a>
                    </div>
                </div>
            </div>
            <br>
            <table class="table table-striped" style="width: 100%">
                <br>
                <thead>
                <tr>
                    <th style="width: 35rem;overflow: hidden">商品名称</th>
                    <th style="width: 8rem;text-align: center">参数</th>
                    <th style="text-align: center">选择</th>
                </tr>
                </thead>
                <tbody>
                {loop $goodsgroup $k $v}
                    <tr style="text-align: center" id="{$v['id']}">
                        <td style="text-align: left">{$v['name']}</td>
                        <td>【商品组】</td>
                        <td style="text-align: center"><a onclick="clickselect(this)" data-id="{$v['id']}" id="sel{$v['id']}" data-name="{$v['name']}" data-type="1">选择</a></td>
                    </tr>
                {/loop}
                {loop $list $gk $gv}
                <tr style="text-align: center" id="{$gv['id']}">
                    <td style="text-align: left">{$gv['title']}</td>
                    <td>{$gv['marketprice']}元</td>
                    <td style="text-align: center"><a onclick="clickselect(this)" data-id="{$gv['id']}" id="sel{$gv['id']}" data-name="{$gv['title']}">选择</a></td>
                </tr>
                {/loop}
                <tr>
                    <td colspan="3" class="text-center">
                        <div>
                            <ul class="pagination pagination-centered">
                                {if $page >1}<li><a href="javascript:;" page="0" class="pager-nav">首页</a></li>
                                <li><a href="javascript:;" page="{$pageprev}" class="pager-nav">«上一页</a></li>{/if}
                                {if $page <$pagelast}<li><a href="javascript:;" page="{$pagenext}" class="pager-nav">下一页»</a></li>
                                <li><a href="javascript:;" page="{$pagelast}" class="pager-nav">尾页</a></li>{/if}
                            </ul>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div><!-- modal-content -->
</div><!--modal-dialog-->
<script>
    $(function () {
        $(".pager-nav").click(function () {
            getpagecontent($(this).attr('page'),'{$type}');
        })
    })
</script>